<template>
	<view class="container">
		<view class="top">
			<view class="officeKeFu">
				<view class="left iconfont icon-fanhuijiantou" @click="goBack">

				</view>
				<view class="middle">
					<image src="../../static/photo.jpg"></image>
				</view>
				<view class="right">
					<view style="font-weight: 700;">官方客服</view>
					<view>9510211 (热线忙，优先选择在线)</view>
				</view>
			</view>
		</view>

		<view class="nickName"> Hi,{{ getUserInfo().nickName }},购物问题小蜜来帮您~
		</view>

		<view class="help">
			<button type="warn" @click="goComplainShop">投诉卖家</button>
			<button type="primary" @click="goFeedback">反馈帮助</button>
		</view>

		<view class="consultProblem">
			<view class="consultProblem-top">
				<text style="margin-right: 10rpx;" class="iconfont-size iconfont icon-xiebao"></text>
				<text>咨询订单问题</text>
			</view>
			<view class="consultProblem-bottom">
				<text class="yuyin iconfont icon-yuyin"></text>
				<view class="myInput">
					<input type="text" placeholder="请输入想咨询的问题" />
				</view>
				<text class="jiahao iconfont icon-jiahao"></text>
			</view>
		</view>
	</view>
</template>

<script>
	import { mapGetters } from 'vuex'
	export default {
		data() {
			return {

			};
		},
		computed: {
			...mapGetters('user', ['getUserInfo'])
		},
		methods: {
			goBack() {
				wx.navigateBack(1)
			},
			// 跳转反馈帮助页面
			goFeedback() {
				uni.navigateTo({
					url: '/subPackages_tousu/Feedback/Feedback'
				})
			},
			// 跳转投诉卖家页面
			goComplainShop() {
				uni.navigateTo({
					url: '/subPackages_tousu/ComplainShop/ComplainShop'
				})
			}
		}
	}
</script>

<style lang="scss">
	body {
		background-color: #EDEDED;
	}

	.container {
		height: 100%;
		width: 100%;

		.top {
			width: 100%;
			height: 120rpx;
			position: sticky;
			top: 50rpx;
			background-color: $uni-bg-color-grey;
			border-bottom: 1px solid #EDEDED;

			.officeKeFu {
				width: 70%;
				height: 100%;
				display: flex;
				justify-content: space-around;
				align-items: center;

				.left {
					margin-left: 10rpx;
				}

				.middle {
					image {
						width: 60rpx;
						height: 60rpx;
						border-radius: 50%;
					}
				}

				.right {
					display: flex;
					flex-direction: column;
					justify-content: center;
					font-size: 12px;
				}
			}
		}

		.help {
			display: flex;
			margin-top: 30rpx;
			justify-content: space-between;
		}

		.nickName {
			margin-top: 100rpx;
			background-color: #fff;
			padding: 20rpx;
			text-align: center;
			border-radius: 40rpx;
		}

		.consultProblem {
			display: flex;
			flex-direction: column;
			position: absolute;
			bottom: 0;
			width: 100%;
			height: 140rpx;
			background-color: $uni-bg-color-grey;
			padding: 20rpx;

			.consultProblem-top {
				flex: 1;
				width: 260rpx;
				border-radius: 60rpx;
				padding: 10rpx 10rpx;
				text-align: center;
				border: 1px solid orangered;
				font-size: 12px;

				.iconfont-size {
					font-size: 12px;
					color: red;
				}
			}

			.consultProblem-bottom {
				flex: 2;
				display: flex;
				align-items: center;
				margin-top: 20rpx;

				.yuyin {
					font-size: 25px;
					margin-right: 10rpx;
				}

				.myInput {
					flex: 1;
					background-color: #fff;
					border-radius: 20rpx;
					line-height: 60rpx;
					font-size: 12px;
					color: grey;
					padding: 15rpx;
				}

				.jiahao {
					font-size: 25px;
					margin-right: 40rpx;
					margin-left: 10rpx;
				}
			}
		}
	}
</style>